package com.justonetech.db.domain.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the EXAM_COURSE table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 * TableComment : 课程
 * SyncTemplatepatterns : list\w*
 * SyncDao : false
 * TableName : 课程
 * SyncBoolean : get
 * SyncJsp : true
 * Treeable : false
 * SubSystem : exam
 * Projectable : false
 *
 * @hibernate.class
 *  table="EXAM_COURSE"
 */

public abstract class BaseExamCourse  implements Serializable {

	public static String REF = "ExamCourse";
	public static String PROP_NAME = "name";
	public static String PROP_LIMIT_COUNT = "limitCount";
	public static String PROP_TECHER = "techer";
	public static String PROP_IS_MAIN = "isMain";
	public static String PROP_ID = "id";
	public static String PROP_END_TIME = "endTime";
	public static String PROP_START_TIME = "startTime";
	public static String PROP_DAY_OF_WEEK = "dayOfWeek";


	// constructors
	public BaseExamCourse () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseExamCourse (java.lang.Long id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Long id;

	// fields
    /*DAY_OF_WEEK*/
    /*星期几*/
	private java.lang.Integer dayOfWeek;
	
    /*END_TIME*/
    /*结束时间*/
	private java.lang.String endTime;
	
    /*IS_MAIN*/
    /*是否主课*/
	private java.lang.Boolean isMain;
	
    /*LIMIT_COUNT*/
    /*人数限制*/
	private java.lang.Integer limitCount;
	
    /*NAME*/
    /*课程名称*/
	private java.lang.String name;
	
    /*START_TIME*/
    /*开始时间*/
	private java.lang.String startTime;
	
    /*TECHER*/
    /*授课教师*/
	private java.lang.String techer;
	

	// collections
	private java.util.Set<com.justonetech.db.domain.ExamSc> examScs;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="com.justonetech.core.orm.hibernate.LongIdGenerator"
     *  column="ID"
     */
	public java.lang.Long getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 * @deprecated
	 */
	public void setId (java.lang.Long id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: DAY_OF_WEEK
	 */
	public java.lang.Integer getDayOfWeek () {
		return dayOfWeek;
	}

	/**
	 * Set the value related to the column: DAY_OF_WEEK
	 * @param dayOfWeek the DAY_OF_WEEK value
	 */
	public void setDayOfWeek (java.lang.Integer dayOfWeek) {
		this.dayOfWeek = dayOfWeek;
	}


	/**
	 * Return the value associated with the column: END_TIME
	 */
	public java.lang.String getEndTime () {
		return endTime;
	}

	/**
	 * Set the value related to the column: END_TIME
	 * @param endTime the END_TIME value
	 */
	public void setEndTime (java.lang.String endTime) {
		this.endTime = endTime;
	}


	/**
	 * Return the value associated with the column: IS_MAIN
	 */
	public java.lang.Boolean getIsMain () {
		return isMain;
	}

	/**
	 * Set the value related to the column: IS_MAIN
	 * @param isMain the IS_MAIN value
	 */
	public void setIsMain (java.lang.Boolean isMain) {
		this.isMain = isMain;
	}


	/**
	 * Return the value associated with the column: LIMIT_COUNT
	 */
	public java.lang.Integer getLimitCount () {
		return limitCount;
	}

	/**
	 * Set the value related to the column: LIMIT_COUNT
	 * @param limitCount the LIMIT_COUNT value
	 */
	public void setLimitCount (java.lang.Integer limitCount) {
		this.limitCount = limitCount;
	}


	/**
	 * Return the value associated with the column: NAME
	 */
	public java.lang.String getName () {
		return name;
	}

	/**
	 * Set the value related to the column: NAME
	 * @param name the NAME value
	 */
	public void setName (java.lang.String name) {
		this.name = name;
	}


	/**
	 * Return the value associated with the column: START_TIME
	 */
	public java.lang.String getStartTime () {
		return startTime;
	}

	/**
	 * Set the value related to the column: START_TIME
	 * @param startTime the START_TIME value
	 */
	public void setStartTime (java.lang.String startTime) {
		this.startTime = startTime;
	}


	/**
	 * Return the value associated with the column: TECHER
	 */
	public java.lang.String getTecher () {
		return techer;
	}

	/**
	 * Set the value related to the column: TECHER
	 * @param techer the TECHER value
	 */
	public void setTecher (java.lang.String techer) {
		this.techer = techer;
	}


	/**
	 * Return the value associated with the column: examScs
	 */
	public java.util.Set<com.justonetech.db.domain.ExamSc> getExamScs () {
		if(examScs == null){
			examScs = new java.util.LinkedHashSet<com.justonetech.db.domain.ExamSc>();
		}
		return examScs;
	}

	/**
	 * Set the value related to the column: examScs
	 * @param examScs the examScs value
	 */
	public void setExamScs (java.util.Set<com.justonetech.db.domain.ExamSc> examScs) {
		this.examScs = examScs;
	}

	public void addToexamScs (com.justonetech.db.domain.ExamSc examSc) {
		if (null == getExamScs()) setExamScs(new java.util.LinkedHashSet<com.justonetech.db.domain.ExamSc>());
		getExamScs().add(examSc);
	}



	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.justonetech.db.domain.ExamCourse)) return false;
		else {
			com.justonetech.db.domain.ExamCourse examCourse = (com.justonetech.db.domain.ExamCourse) obj;
			if (null == this.getId() || null == examCourse.getId()) return false;
			else return (this.getId().equals(examCourse.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		org.apache.commons.lang.builder.ToStringBuilder builder = new org.apache.commons.lang.builder.ToStringBuilder(this);
		builder.append(id);
		builder.append(dayOfWeek);
		builder.append(endTime);
		builder.append(isMain);
		builder.append(limitCount);
		builder.append(name);
		builder.append(startTime);
		builder.append(techer);
		return builder.toString();
	}


}